﻿using StarsAdmin.Core.Models;

namespace StarsAdmin.Core.BaseService
{
    public interface IGetBaseService<TDto> where TDto : class
    {
        /// <summary>
        /// 获取所有数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<List<TDto>> GetAllAsync(BaseQueryInput input);

        /// <summary>
        /// 分页获取数据
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<Page<TDto>> GetPageAsync(PageQueryInput input);

        /// <summary>
        /// 根据Id获取数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<TDto?> GetByIdAsync(long id);

        /// <summary>
        /// 根据Id集合获取数据
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task<List<TDto>> GetByIdsAsync(long[] ids);
    }
}